Skip to content

Add BigDecimal benchmarks, Lombok builder-vs-constructor, and CLAUDE.md#2

Open
xp-vit wants to merge 1 commit into
mainfrom
add-big-int-performance-test
Open

Add BigDecimal benchmarks, Lombok builder-vs-constructor, and CLAUDE.md#2
xp-vit wants to merge 1 commit into
mainfrom
add-big-int-performance-test

Conversation

@xp-vit

@xp-vit xp-vit commented Jun 6, 2026

Copy link
Copy Markdown
Owner

Summary

New JMH microbenchmarks plus repo guidance.

New benchmarks (vs main)

  • bigdec/BigDecConstructornew BigDecimal(String) vs new BigDecimal(double)
  • bigdec/BigDecDivideVsMovedivide vs movePointLeft vs scaleByPowerOfTen
  • bigdec/BigDecMultiplyVsMovemultiply vs movePointRight vs scaleByPowerOfTen
  • lombok/BuilderVsConstructor (+ BigDecimalTuple helper) — @Builder vs constructor
  • utils/BenchmarkUtils — minor tweak

Docs

  • CLAUDE.md — build/run commands, architecture, conventions

Results (throughput ops/ns, higher = faster)

  • Constructor: string 0.084 vs doubleCreation 0.010 → String ctor ~8× faster
  • Divide: move2Left 0.544 vs divide 0.043 → movePointLeft ~12× faster than divide
  • Multiply: move2Right 0.547 ≈ multiply 0.498 ≈ scaleByPowerOfTen 0.481

Note: multiply/scaleByPowerOfTen had wide error bars under the gradle jmh{} settings (1 warmup, 3 iters) — rerun via each class main() for tighter numbers.

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant